<template>
  <div v-if="editShow">
    <h3>Edit Source Data</h3>
    <ProvideFormVue 
    :formData="formData"
    :SelectData="SelectList"
    @Confirm="handleEditFormData(formData)"
      />
  </div>
</template>
<script>
import ProvideFormVue from './ProvideForm.vue'
export default {
  data() {
    return {
        editShow:false,
        formData:{},
        SelectList:[],
        res:{
            sourceName:"zhangkai",
            description:"这可根据id",
            type:"AK47",
            host:"localhost",
            port:"8888",
            sourceLocation:"北京",
        }
    }
  },
  created(){
    //模拟请求省略。。。。
    this.formData = this.res
    this.SelectList = ['MQTT','AK47','AWM','M416']

  },
  computed:{

  },
  components:{
    ProvideFormVue
  },
  methods:{
    handleEditFormData(formData){
        console.log("更新请求",formData)
    }
  },
}
</script>
<style scoped>

</style>
